package com.wxy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

import com.wxy.feignConfig.feignConfig;

@SpringBootApplication
@EnableFeignClients(basePackages = "com.wxy.client",defaultConfiguration = feignConfig.class)
public class springBoot2Application {
	public static void main(String[] args) {
		SpringApplication.run(springBoot2Application.class, args);
	}
	//实现在java代码中发送http请求
	@Bean
	@LoadBalanced
	public RestTemplate restTemplate() {
		return new RestTemplate();
	}
}
